// 创建一个空的散列表
let myMap = {};

// 添加键值对
myMap["key1"] = "value1";
myMap["key2"] = "value2";
myMap["key3"] = "value3";

// 获取值
console.log(myMap["key1"]); // 输出 "value1"

// 删除键值对
delete myMap["key2"];

// 遍历散列表
for (let key in myMap) {
  console.log(key + ": " + myMap[key]);
}


//使用map创建字典
const dictionary = new Map();
dictionary.set('apple', '苹果');
dictionary.set('banana', '香蕉');
dictionary.set('cherry', '樱桃');
